package com.otod.commons.auth;

import org.apache.shiro.SecurityUtils;

import com.otod.sys.auth.service.ShiroDbRealm.Principal;

/**
 * 用户util
 * @author jqiu
 */
public class SessionUserUtil {
	
	/**
	 * 取得当前登陆用户信息
	 * @return 
	 */
	public static SessionUserHolder getCurrentUser(){
		return ((Principal)SecurityUtils.getSubject().getPrincipal()).getUser();
	}
}
